import ElementPlus from "element-plus";
import { createApp } from "vue";
import { createPinia } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate";
import "element-plus/dist/index.css";
import App from "./App.vue";
import router from "./router";
import { Path } from "@/constant";
import Echarts from "vue-echarts";
import * as echarts from "echarts";
import VueGtag from 'vue-gtag-next';

const app = createApp(App);

app.component("v-chart", Echarts);

app.config.globalProperties.$echarts = echarts;

const pinia = createPinia();
pinia.use(
  createPersistedState({
    storage: localStorage,
  })
);

app.use(VueGtag, {
  property: {
    id: 'G-45FX7QL9RX', // 替换为你的跟踪ID
  }
}, router);
app.use(pinia);
app.use(router);
app.use(ElementPlus);
app.use(Path);
app.mount("#app");
